/* 
 * File:   log.h
 * Author: Faraj
 *
 * Created on May 11, 2013, 9:23 PM
 */

#ifndef LOG_H
#define	LOG_H

#ifdef _WIN32
#include <windows.h>
#endif

#include <string>
#include <stdio.h>
#include <time.h>
using namespace std;

namespace lib {
    namespace common {

        class log {
        public:
            static void info(string msg);
            static void warn(string msg);
            static void error(string msg);
            static void trace(string msg);
        private:
            static void _msg(string type, string msg);
            static string _current_datetime();
            static void _color(string color);
            static void _reset_color();
#ifdef _WIN32
            static CONSOLE_SCREEN_BUFFER_INFO _csbi;
#endif
        };
    };
};

#endif	/* LOG_H */

